<extend name="Layout/application"/>

<block name="content">
   <section class="content-header">
      <h1>
         新增菜单
         <small>Permission create</small>
      </h1>
      <ol class="breadcrumb">
         <li><a href="#"><i class="fa fa-dashboard"></i> Permission</a></li>
         <li class="active">Create</li>
      </ol>
   </section>

   <section class="content" style="width: 70%">
      <div class="box box-success">

         <include file="Layout/_flash"/>

         <div class="box-body">
            <form role="form" method="post" action="{{:url('permissions/save')}}">

               <div class="nav-tabs-custom">
                  <ul class="nav nav-tabs">
                     <li class="active"><a href="#tab1" data-toggle="tab">新增菜单</a></li>
                     <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm"
                                               style="padding:10px 2px;"><i class="fa fa-list"></i> 返回</a></li>
                  </ul>
                  <div class="tab-content">
                     <div class="tab-pane active" id="tab1">
                        <div class="box-body">

                           <div class="form-group">
                              <label>所属菜单</label>
                              <select class="form-control" name="parent_id">
                                 <option value="0">顶级菜单</option>

                                 <volist name="permissions" id="permission">
                                    <option value="{{$permission.id}}">{{$permission.name}}</option>
                                    <volist name="$permission.children" id="children">
                                       <option value="{{$children.id}}">&nbsp;&nbsp;&nbsp;|--{{$children.name}}
                                       </option>
                                    </volist>
                                 </volist>
                              </select>
                           </div>

                           <div class="form-group">
                              <label>权限名称</label>
                              <input type="text" name="name" class="form-control" placeholder="请输入权限名称">
                           </div>

                           <div class="form-group">
                              <label>权限路由</label>
                              <input type="text" name="label" class="form-control" placeholder="请输入权限路由">
                           </div>

                           <div class="form-group">
                              <label>权限图标</label>
                              <input type="text" name="icon" class="form-control" placeholder="请输入权限图标">
                           </div>

                           <div class="form-group">
                              <label>排序</label>
                              <input type="text" name="sort_order" class="form-control" placeholder="请输入排序">
                           </div>

                           <div class="box-footer">
                              <button type="submit" class="btn btn-primary">提交</button>
                              <button type="reset" class="btn btn-default">重置</button>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>


            </form>
         </div>
      </div>

   </section>
</block>



